import request from '../utils/request'

// 获取用户id的订单列表
export const getOrderListService = (id) => request.get('/order/user/' + id)

// 获取订单详情
export const getOrderDetailService = (id) => request.get('/order/' + id)

//删除订单
export const deleteOrderService = (id) => request.delete('/order/' + id)

//添加订单
export const addOrderService = (data) => request.post('/order/add', data)

//提交订单
export const submitOrderService = (userId) => request.post('/order/change/static/' + userId)

//获取已购列表
export const getPurchasedListService = (userId) => request.get('/order/cart/' + userId)

//修改状态
export const changeStatusService = (id) => request.put('/order/change/status/' + id)

//获取商家订单列表
export const getBossOrderListService = (busId) => request.get('/order/boss/' + busId)
